<?php
$cs = Yii::app()->clientScript;
$cs->registerScriptFile($this->layout_asset . '/js/coin-slider.js');
$slideshow = Slide::model()->findAllByAttributes(array('slide_show' => 1));
?>
<div id="games">
    <?php
    foreach ($slideshow as $slide) {
        ?>
        <a href="<?= $slide['slide_link']; ?>" target="_blank">
            <img src="<?= RESOURCE_URL . '/' . $slide['slide_images'] ?>" />
            <span><?= $slide['slide_short'] ?></span>
        </a>
        <?php
    }
    ?>
</div>
<script>
    $('#games').coinslider();
</script>